#ifndef _SPRITE_H_
#define _SPRITE_H_

#include "render.h"

struct sprite_vrt
{
	float pos[3];
	float rwh;
	u32	  clr;
	float tex[2];
};

class sprite
{
public:
	sprite(float _x,float _y,float _z,float _w,float _h,texture* _tex=0,float _tu=0.0f,float _tv=0.0f,float _tw=1.0f,float _th=1.0f,color _clr=color(1.0f,1.0f,1.0f,1.0f));
	sprite();

	void set_pos(float _x,float _y,float _z=0.0f)
	{
		x=_x;
		y=_y;
		z=_z;
	}

	void set_texture(texture* _tex)
	{
		tex=_tex;
	}

	void set_color(color _clr)
	{
		clr = _clr;
	}

	void draw();

private:
	float x;
	float y;
	float z;
	float w;
	float h;
	float tu;
	float tv;
	float tw;
	float th;

	color    clr;
	texture* tex;
	render*  m_render;
};

#endif